﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    >

    <LinearGradientBrush x:Key="ToolbarBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFD4D4D4" Offset="0"/>
        <GradientStop Color="White" Offset="1"/>
    </LinearGradientBrush>

	<LinearGradientBrush x:Key="ToolbarBackgroundDark" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#BFC8C8C8" Offset="0"/>
        <GradientStop Color="#BFE5E5E5" Offset="1"/>
    </LinearGradientBrush>
	
	<DropShadowEffect x:Key="DropShadowLevel1" Opacity="0.345"/>

    <DropShadowEffect x:Key="DialogShadow" Opacity="0.5" ShadowDepth="10"/>
	
  <VisualBrush x:Key="MenuBackground">
    <VisualBrush.Visual>
      <Grid Width="10" Height="10">
        <Rectangle>
          <Rectangle.Fill>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0.5,0">
              <GradientStop Color="#FFC0C0C0" />
              <GradientStop Color="#FF707070" Offset="0.7"/>
            </LinearGradientBrush>
          </Rectangle.Fill>
        </Rectangle>
        <Rectangle>
          <Rectangle.Fill>
            <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
              <GradientStop Color="#c0ffffff"/>
              <GradientStop Offset="0.5"/>
            </LinearGradientBrush>
          </Rectangle.Fill>
        </Rectangle>
      </Grid>
    </VisualBrush.Visual>
  </VisualBrush>

  <RadialGradientBrush x:Key="MainBackgorundBrush" Center="0.2,0.2" GradientOrigin="0,0" RadiusX="0.75">
    <RadialGradientBrush.RelativeTransform>
      <TransformGroup>
        <ScaleTransform/>
        <SkewTransform/>
        <RotateTransform/>
        <TranslateTransform/>
      </TransformGroup>
    </RadialGradientBrush.RelativeTransform>
    <GradientStop Color="Black" Offset="0"/>
    <GradientStop Color="#FF32343D" Offset="0.668"/>
    <GradientStop Color="Black" Offset="1"/>
  </RadialGradientBrush>
  <RadialGradientBrush x:Key="DialogBackgorundBrush" Center="0.2,0.2" GradientOrigin="0,0" RadiusX="0.75">
  	<RadialGradientBrush.RelativeTransform>
  		<TransformGroup>
  			<ScaleTransform/>
  			<SkewTransform/>
  			<RotateTransform/>
  			<TranslateTransform/>
  		</TransformGroup>
  	</RadialGradientBrush.RelativeTransform>
  	<GradientStop Color="#FFAFAFAF" Offset="0.684"/>
  	<GradientStop Color="#FFA5A5A5"/>
  	<GradientStop Color="#FFA5A5A5" Offset="1"/>
  </RadialGradientBrush>

  <RadialGradientBrush x:Key="LightControlBackgorundBrush" GradientOrigin="0,0" Center="0.2,0.4" RadiusX="0.75" RadiusY="0.5" SpreadMethod="Pad">
    <GradientStop Color="#FF555564" Offset="0"/>
    <GradientStop Color="#FF72809B" Offset="0.672"/>
    <GradientStop Color="#FF555564" Offset="1"/>
  </RadialGradientBrush>

	<ImageBrush 
		x:Key="SpeckleBrush" 
		TileMode="Tile" 
		Opacity="0.07" 
		Viewport="0,0,100,100" 
		ViewportUnits="Absolute" 
		ImageSource="/TfsWorkbench.UIElements;component/Images/Speckle.png"
		/>
		
    <VisualBrush x:Key="ListControlBackground" Stretch="None">
        <VisualBrush.Visual>
            <Grid>
                <Rectangle Fill="Blue" Opacity="0.07" />
                <Rectangle Fill="{DynamicResource SpeckleBrush}" />
            </Grid>
        </VisualBrush.Visual>
    </VisualBrush>
    
    <RadialGradientBrush x:Key="DisableOverlayBrush" Center="0.25,0.25" Opacity="0.7">
    	<GradientStop Color="#A5000000" Offset="0.216"/>
    	<GradientStop Color="Black" Offset="1"/>
    	<GradientStop Color="#8C000000"/>
    </RadialGradientBrush>
		
    <Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="5" />
        <Setter Property="Margin" Value="4,4,4,0" />
        <Setter Property="Background" Value="{DynamicResource DisplayModeBackground}" />
        <Setter Property="Padding" Value="6" />
        <Setter Property="BorderBrush" Value="#FF646464" />
        <Setter Property="BorderThickness" Value="1" />
    </Style>

    <Style x:Key="DialogBorder" TargetType="{x:Type Border}">
  	<Setter Property="Background" Value="{DynamicResource DialogBackground}"/>
  	<Setter Property="BorderBrush" Value="Black"/>
  	<Setter Property="BorderThickness" Value="0"/>
  	<Setter Property="CornerRadius" Value="10"/>
  	<Setter Property="Padding" Value="10"/>
  	<Setter Property="Effect" Value="{DynamicResource DialogShadow}"/>
  </Style>
  
    <Style x:Key="DialogCaptionStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="16" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="IsHitTestVisible" Value="False" />
    </Style>

    <Style x:Key="DialogInnerBorderStyle" TargetType="{x:Type Border}" BasedOn="{StaticResource MainBorderStyle}">
        <Setter Property="Margin" Value="0,14,0,0" />
    </Style>

    <VisualBrush x:Key="MainBackground" Stretch="None">
        <VisualBrush.Visual>
            <Grid Width="3000" Height="3000">
                <Rectangle Fill="{DynamicResource MainBackgorundBrush}" />
                <Rectangle>
                    <Rectangle.Fill>
                        <ImageBrush TileMode="Tile" Opacity="0.05"  Viewport="0,0,100,100" ViewportUnits="Absolute" ImageSource="/TfsWorkbench.UIElements;component/Images/Speckle.png" />
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
        </VisualBrush.Visual>
    </VisualBrush>
    
    <Style x:Key="BackgroundTest" TargetType="Button">
  	<Setter Property="Template">
  		<Setter.Value>
  			<ControlTemplate>
	  			<Grid d:DesignWidth="400" d:DesignHeight="300" Background="{StaticResource MainBackground}" Height="604" Width="629">
	  				<Border 
						Style="{DynamicResource MainBorderStyle}" 
						Margin="10,10,10,378"
						>
	  					<Border 
	  						Style="{DynamicResource DialogBorder}" 
	  						Margin="1,10,13,16"
						>
	  						<Border 
	  							Style="{DynamicResource MainBorderStyle}" 
	  							Margin="10,53,10,10"
						/>
	  					</Border>
	  				</Border>

	  				<Border
						CornerRadius="5" 
						Effect="{DynamicResource DropShadowLevel1}" 
						Background="{DynamicResource ToolbarBackground}" 
						Padding="10" 
						Margin="10,230,10,76" HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Width="Auto"
						>
	  					<Border 
	  						Style="{DynamicResource DialogBorder}" 
	  						Margin="1,10,7,13"
						>
	  						<Border 
	  							Style="{DynamicResource MainBorderStyle}" 
	  							Margin="10,53,10,10"
						/>
	  					</Border>
	  				</Border>

	  				<Border
						CornerRadius="5" 
						Effect="{DynamicResource DropShadowLevel1}" 
						Background="{DynamicResource ToolbarBackgroundDark}" 
						Padding="10" 
						Margin="8,0,10,8" HorizontalAlignment="Stretch" Height="64" VerticalAlignment="Bottom" Width="Auto"
						/>
				</Grid>		
			</ControlTemplate>
		</Setter.Value> 	
	</Setter>
  </Style>

  <VisualBrush x:Key="DialogBackground" Stretch="None">
  	<VisualBrush.Visual>
  		<Grid Width="3000" Height="3000">
  			<Rectangle Fill="{DynamicResource DialogBackgorundBrush}" />
  			<Rectangle>
  				<Rectangle.Fill>
  					<ImageBrush TileMode="Tile" Opacity="0.05"  Viewport="0,0,100,100" ViewportUnits="Absolute" ImageSource="/TfsWorkbench.UIElements;component/Images/Speckle.png" />
  				</Rectangle.Fill>
  			</Rectangle>
  		</Grid>
  	</VisualBrush.Visual>
  </VisualBrush>

    <Style x:Key="CommandPanel" TargetType="{x:Type StackPanel}">
    <Setter Property="Orientation" Value="Horizontal" />
  </Style>

  <Style x:Key="RowFocusStyle" TargetType="{x:Type Control}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Control}">
          <Grid Background="{DynamicResource RowBackground}" d:DesignWidth="271" d:DesignHeight="83"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <VisualBrush x:Key="Arrow">
    <VisualBrush.Visual>
      <Grid Height="30" Width="60">
        <Path Fill="Black" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Data="M119,108.3 L90.5,104.5 147.5,104.5 z" VerticalAlignment="Top" />
      </Grid>
    </VisualBrush.Visual>
  </VisualBrush>

  <Style x:Key="GreyOutOnReadOnly" TargetType="TextBox">
    <Style.Triggers>
      <Trigger Property="IsReadOnly" Value="True">
        <Setter Property="Background" Value="gainsboro" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
      </Trigger>
    </Style.Triggers>
  </Style>

  <LinearGradientBrush x:Key="ScrollBarControlBrush"  EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE5E5E5" Offset="1"/>
    <GradientStop Color="White"/>
  </LinearGradientBrush>

  <LinearGradientBrush x:Key="VerticalScrollBarBackground" EndPoint="1,0" StartPoint="0,0">
    <GradientStop Color="#E1E1E1" Offset="0"/>
    <GradientStop Color="#EDEDED" Offset="0.20"/>
    <GradientStop Color="#EDEDED" Offset="0.80"/>
    <GradientStop Color="#E3E3E3" Offset="1"/>
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ScrollBarDisabledBackground" Color="#F4F4F4"/>
  <Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Grid>
            <Path StrokeThickness="1.0" Effect="{DynamicResource DropShadowLevel1}" Stroke="{x:Null}" StrokeMiterLimit="1.0" Fill="{DynamicResource ScrollBarControlBrush}" Data="F1 M 10.311,0.835 C 10.213,0.785 10.110,0.751 10.009,0.711 C 9.928,0.679 9.849,0.638 9.766,0.614 C 9.682,0.589 9.595,0.581 9.510,0.563 C 9.406,0.542 9.304,0.514 9.199,0.504 C 9.104,0.496 9.009,0.503 8.913,0.503 C 8.817,0.503 8.722,0.496 8.627,0.504 C 8.522,0.514 8.421,0.542 8.317,0.563 C 8.231,0.581 8.145,0.589 8.062,0.614 C 7.979,0.638 7.899,0.679 7.818,0.711 C 7.717,0.751 7.613,0.785 7.517,0.835 C 7.456,0.868 7.400,0.914 7.342,0.950 C 7.230,1.018 7.119,1.084 7.017,1.168 C 7.011,1.173 7.004,1.176 6.998,1.181 C 6.925,1.242 6.868,1.314 6.803,1.379 C 6.737,1.445 6.665,1.501 6.604,1.575 L 6.573,1.612 C 6.572,1.613 6.571,1.614 6.570,1.616 L 1.190,8.101 C 0.133,9.376 0.310,11.268 1.584,12.325 C 2.859,13.383 4.751,13.207 5.809,11.931 L 8.913,8.189 L 12.018,11.931 C 13.075,13.207 14.967,13.383 16.242,12.325 C 16.957,11.732 17.327,10.876 17.327,10.014 C 17.327,9.339 17.101,8.661 16.636,8.101 L 11.223,1.575 C 11.135,1.468 11.033,1.382 10.935,1.292 C 10.896,1.256 10.869,1.214 10.829,1.181 C 10.823,1.176 10.816,1.173 10.811,1.168 C 10.708,1.084 10.596,1.018 10.485,0.950 C 10.426,0.914 10.371,0.868 10.311,0.835 Z" VerticalAlignment="Center" HorizontalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Grid>
            <Rectangle Fill="{DynamicResource ScrollBarControlBrush}" RadiusX="3" RadiusY="3" Effect="{DynamicResource DropShadowLevel1}"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <LinearGradientBrush x:Key="HorizontalScrollBarBackground" EndPoint="0,1" StartPoint="0,0">
    <GradientStop Color="#E1E1E1" Offset="0"/>
    <GradientStop Color="#EDEDED" Offset="0.20"/>
    <GradientStop Color="#EDEDED" Offset="0.80"/>
    <GradientStop Color="#E3E3E3" Offset="1"/>
  </LinearGradientBrush>
  <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="VerticalScrollBarTemplate" TargetType="{x:Type ScrollBar}">
    <Grid x:Name="Bg" SnapsToDevicePixels="true">
      <Grid.RowDefinitions>
        <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" Height="25"/>
        <RowDefinition/>
        <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" Height="25"/>
      </Grid.RowDefinitions>
      <Rectangle Fill="#33FFFFFF" Stroke="#66FFFFFF" RadiusX="3" RadiusY="3" Margin="0,5" VerticalAlignment="Stretch" Width="8" Grid.Row="1" Grid.RowSpan="1"/>
      <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineUpCommand}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="UpArrow" HorizontalAlignment="Center" VerticalAlignment="Top" Height="20" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5">
        <RepeatButton.RenderTransform>
          <TransformGroup>
            <ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
            <SkewTransform/>
            <RotateTransform/>
            <TranslateTransform/>
          </TransformGroup>
        </RepeatButton.RenderTransform>
      </RepeatButton>
      <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1" IsDirectionReversed="true" Margin="0,5">
        <Track.Thumb>
          <Thumb Style="{StaticResource ScrollBarThumb}" Width="8" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="VerticalGripper" Margin="0"/>
        </Track.Thumb>
        <Track.IncreaseRepeatButton>
          <RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageDownCommand}"/>
        </Track.IncreaseRepeatButton>
        <Track.DecreaseRepeatButton>
          <RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageUpCommand}"/>
        </Track.DecreaseRepeatButton>
      </Track>
      <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineDownCommand}" Grid.Row="1" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="DownArrow" HorizontalAlignment="Center" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" Height="20" Grid.RowSpan="2">
        <RepeatButton.RenderTransform>
          <TransformGroup>
            <ScaleTransform ScaleX="0.8" ScaleY="-0.8"/>
            <SkewTransform AngleX="0" AngleY="0"/>
            <RotateTransform Angle="0"/>
            <TranslateTransform/>
          </TransformGroup>
        </RepeatButton.RenderTransform>
      </RepeatButton>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Opacity" TargetName="Bg" Value="0.1"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>

  <ControlTemplate x:Key="HorizontalScrollBarTemplate" TargetType="{x:Type ScrollBar}">
    <Grid x:Name="Bg" SnapsToDevicePixels="true">
      <Grid.ColumnDefinitions>
        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" Width="Auto"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Rectangle Fill="#33FFFFFF" Stroke="#66FFFFFF" RadiusX="3" RadiusY="3" Margin="5,0" VerticalAlignment="Center" Height="8" Grid.Column="1" />
      <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineLeftCommand}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="LeftArrow" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" Width="Auto" Grid.Column="0">
        <RepeatButton.RenderTransform>
          <TransformGroup>
            <ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
            <SkewTransform/>
            <RotateTransform Angle="270"/>
            <TranslateTransform/>
          </TransformGroup>
        </RepeatButton.RenderTransform>
      </RepeatButton>
      <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Column="1">
        <Track.DecreaseRepeatButton>
          <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageLeftCommand}"/>
        </Track.DecreaseRepeatButton>
        <Track.IncreaseRepeatButton>
          <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageRightCommand}"/>
        </Track.IncreaseRepeatButton>
        <Track.Thumb>
          <Thumb Style="{StaticResource ScrollBarThumb}" Height="8" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="HorizontalGripper"/>
        </Track.Thumb>
      </Track>
      <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineRightCommand}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="LeftArrow" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" Width="Auto" Grid.Column="2">
        <RepeatButton.RenderTransform>
          <TransformGroup>
            <ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
            <SkewTransform/>
            <RotateTransform Angle="90"/>
            <TranslateTransform/>
          </TransformGroup>
        </RepeatButton.RenderTransform>
      </RepeatButton>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>

  <Style x:Key="ScrollBarStyle_MainContent" TargetType="{x:Type ScrollBar}">
    <Setter Property="Background" Value="{StaticResource VerticalScrollBarBackground}"/>
    <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
    <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    <Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
    <Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
    <Setter Property="Template" Value="{DynamicResource VerticalScrollBarTemplate}" />
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Width" Value="Auto"/>
        <Setter Property="MinWidth" Value="0"/>
        <Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
        <Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
        <Setter Property="Background" Value="{DynamicResource HorizontalScrollBarBackground}"/>
        <Setter Property="Template" Value="{DynamicResource HorizontalScrollBarTemplate}" />
        </Trigger>
    </Style.Triggers>
  </Style>

   <Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource ScrollBarStyle_MainContent}" />
    
  <LinearGradientBrush x:Key="TransparentBackground1" EndPoint="0.5,1" StartPoint="0.5,0" Opacity="0.7">
  	<LinearGradientBrush.RelativeTransform>
  		<TransformGroup>
  			<ScaleTransform CenterX="0.5" CenterY="0.5"/>
  			<SkewTransform CenterX="0.5" CenterY="0.5"/>
  			<RotateTransform Angle="350" CenterX="0.5" CenterY="0.5"/>
  			<TranslateTransform/>
  		</TransformGroup>
  	</LinearGradientBrush.RelativeTransform>
  	<GradientStop Color="#59000000" Offset="1"/>
  	<GradientStop Color="#B2808080"/>
  </LinearGradientBrush>

    <Style TargetType="{x:Type TabItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid>
                        <Border  
                            Name="PART_Border" 
                            Margin="3"  
                            CornerRadius="5"
                            Padding="3"
                            >
                            <Grid>
                                <ContentPresenter 
                                    x:Name="PART_ContentSite" 
                                    VerticalAlignment="Center" 
                                    HorizontalAlignment="Center" 
                                    ContentSource="Header" 
                                    Margin="12,2,12,2" 
                                    RecognizesAccessKey="True"
                                />
                                <Path 
                                    Name="PART_SelectionGraphic"
                                    Fill="White" 
                                    Stretch="Fill" 
                                    Margin="0,0,0,-9" 
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Bottom" 
                                    Height="6" 
                                    Data="M0.10118861,4.8566596 L11.466845,9.6121413 22.518653,4.8566594 z" 
                                    Width="25" 
                                    Visibility="Hidden" 
                                />
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="False">
                            <Setter TargetName="PART_Border" Property="Effect" Value="{x:Null}" />
                            <Setter TargetName="PART_Border" Property="Background" Value="{DynamicResource ToolbarBackgroundDark}" />
                            <Setter TargetName="PART_SelectionGraphic" Property="Visibility" Value="Hidden" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Panel.ZIndex" Value="100" />
                            <Setter TargetName="PART_Border" Property="Effect" Value="{DynamicResource DropShadowLevel1}" />
                            <Setter TargetName="PART_Border" Property="Background" Value="{DynamicResource ToolbarBackground}" />
                            <Setter TargetName="PART_SelectionGraphic" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="PART_Border" Property="Effect" Value="{DynamicResource DropShadowLevel1}" />
                                <Setter TargetName="PART_Border" Property="Background" Value="{DynamicResource ToolbarBackground}" />
                                <Setter TargetName="PART_ContentSite" Property="TextBlock.Foreground" Value="DarkRed" />
                            </MultiTrigger.Setters>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
	
    <Style x:Key="GridViewColumnHeaderGripper" TargetType="{x:Type Thumb}">
        <Setter Property="Canvas.Right" Value="-9"/>
        <Setter Property="Width" Value="18"/>
        <Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Background" Value="#40000000"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Background="Transparent" Padding="{TemplateBinding Padding}">
                        <Rectangle Fill="{TemplateBinding Background}" HorizontalAlignment="Center" Width="1"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <LinearGradientBrush x:Key="GridViewColumnHeaderHoverBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFF7F7F7" Offset="0"/>
        <GradientStop Color="#FFF7F7F7" Offset="1"/>
    </LinearGradientBrush>
    
    <LinearGradientBrush x:Key="GridViewColumnHeaderPressBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFE4E4E4" Offset="0"/>
        <GradientStop Color="#FFEFEFEF" Offset="1"/>
    </LinearGradientBrush>

    <Style TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="MinWidth" Value="25" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                    <Grid SnapsToDevicePixels="true">
                        <Border x:Name="HeaderBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,1,0,1">
                            <Border Padding="{TemplateBinding Padding}">
                                <ContentPresenter 
									x:Name="HeaderContent" 
                                    TextBlock.FontWeight="Bold"
									HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
									Margin="5,0,5,2" 
									VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
									SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
									RecognizesAccessKey="True"/>
                            </Border>
                        </Border>
                        <Border x:Name="HeaderHoverBorder" Margin="1,1,0,0" BorderThickness="1,0,1,1"/>
                        <Border x:Name="HeaderPressBorder" Margin="1,0,0,1" BorderThickness="1,1,1,0"/>
                        <Canvas>
                            <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}" />
                        </Canvas>
                        <Rectangle Fill="{x:Null}" Stroke="Blue" StrokeThickness="1" VerticalAlignment="Bottom" Margin="0,0,0,2" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                        	<Setter Property="TextBlock.Foreground" TargetName="HeaderContent" Value="DarkRed" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                        	<Setter Property="TextBlock.Foreground" TargetName="HeaderContent" Value="DarkRed" />
                            <Setter Property="Visibility" TargetName="PART_HeaderGripper" Value="Hidden"/>
                            <Setter Property="Margin" TargetName="HeaderContent" Value="1,1,0,0"/>
                        </Trigger>
                        <Trigger Property="Height" Value="Auto">
                            <Setter Property="MinHeight" Value="20"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Role" Value="Floating">
                <Setter Property="Opacity" Value="0.4082"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                            <Canvas x:Name="PART_FloatingHeaderCanvas">
                                <Rectangle Fill="#FF000000" Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}" Opacity="0.4697"/>
                            </Canvas>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Role" Value="Padding">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                            <Border x:Name="HeaderBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,1,0,1"/>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Height" Value="Auto">
                                    <Setter Property="MinHeight" Value="20"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <RadialGradientBrush x:Key="DisplayModeBackground" Center="0.25,0.27" RadiusX="0.75" RadiusY="0.45" GradientOrigin="0.4,0.55">
    	<GradientStop Color="#33FFFFFF"/>
    	<GradientStop Color="#26FFFFFF" Offset="0.389"/>
    	<GradientStop Color="#2BFFFFFF" Offset="1"/>
    </RadialGradientBrush>
    <SolidColorBrush x:Key="DisplayModeTextColour" Color="#FFD2D2D2"/>
</ResourceDictionary>